#include<bits/stdc++.h>
using namespace std;
#define int long long
class u
{
	public:
		vector<int> p;
		vector<int> r;
		u(int n)
		{
			p.resize(n);
			r.resize(n, 1);
			for (int i = 0; i < n; i++) {
				p[i] = i;
			}
		}
		int find(int x)
		{
			if (x != find(p[x])) {
				p[x] = find(p[x]);
			}
			return p[x];
		}
		void unite(int x, int y)
		{
			int rx = find(x);
			int ry = find(y);
			if (r[rx] > r[ry]) {
				p[ry] = rx;
			} else if (r[ry] > r[rx]) {
				p[rx] = ry;
			} else {
				p[ry] = rx;
				r[rx] ++;
			}
		}
};
signed main()
{
	int n, m;

	cin >> n >> m;
	u uu(n);
	int a,b,c;
	cin >> a >> b>>c;
	for(int i=0;i<m;i++){
		uu.unite()
	}
	return 0;
}
// 07点59分

